#ifndef CCOLORSHADERCLASS_H
#define CCOLORSHADERCLASS_H

class CColorShaderClass
{
	struct MatrixBufferType
	{
		D3DXMATRIX d3dWorldMatrix;
		D3DXMATRIX d3dViewMatrix;
		D3DXMATRIX d3dProjectionMatrix;
	};

	ID3D11VertexShader* m_pVertexShader;
	ID3D11PixelShader* m_pPixelShader;
	ID3D11InputLayout* m_pLayout;
	ID3D11Buffer* m_pMatrixBuffer;

	bool InitializeShader(ID3D11Device* pDevice, HWND hWnd, WCHAR* pwszVSFileName, WCHAR* pwszPSFileName);
	void ShutDownShader();
	void OutputShaderErrorMessage(ID3D10Blob* pErrorMessage, HWND hWnd, WCHAR* pwszShaderFileName);

	bool SetShaderParameters(ID3D11DeviceContext* pDeviceContext, D3DXMATRIX d3dWorld, D3DXMATRIX d3dView, D3DXMATRIX d3dProj);
	void RenderShader(ID3D11DeviceContext* pDeviceContext, int nIndexCount);

public:
	CColorShaderClass(void);
	CColorShaderClass(const CColorShaderClass&);
	~CColorShaderClass(void);

	bool Initialize(ID3D11Device* pDevice, HWND hWnd);
	void ShutDown();
	bool Render(ID3D11DeviceContext* pDeviceContext, int nIndexCount, D3DXMATRIX d3dWorld, D3DXMATRIX d3dView, D3DXMATRIX d3dProj);

};

#endif